import 'package:ichinesereader/models/book/BookRelease.dart';

// class BookReleaseChartData {
//   BookReleaseChartData(
//       this.date,
//       this.book1,
//       this.book2,
//       this.book3,
//       this.book4,
//       this.book5,
//       this.book6,
//       this.book7,
//       this.book8,
//       this.book9,
//       this.book10,
//       this.book11,
//       this.book12,
//       this.book13,
//       this.book14,
//       this.book15);
//   final String date;
//   final BookReleaseItem? book1;
//   final BookReleaseItem? book2;
//   final BookReleaseItem? book3;
//   final BookReleaseItem? book4;
//   final BookReleaseItem? book5;
//   final BookReleaseItem? book6;
//   final BookReleaseItem? book7;
//   final BookReleaseItem? book8;
//   final BookReleaseItem? book9;
//   final BookReleaseItem? book10;
//   final BookReleaseItem? book11;
//   final BookReleaseItem? book12;
//   final BookReleaseItem? book13;
//   final BookReleaseItem? book14;
//   final BookReleaseItem? book15;
// }

class BookReleaseChartData {
  BookReleaseChartData(this.date, this.book, this.value);
  final String date;
  final BookReleaseItem book;
  final int value;
}

// class BookReleaseChartData {
//   final Map<dynamic, dynamic> data;

//   BookReleaseChartData(this.data);

//   factory BookReleaseChartData.fromJson(dynamic json) {
//     assert(json is Map);
//     return BookReleaseChartData(json['data']);
//   }
// }

// void main() {
//   // Let's say this is your json
//   final json = {
//     'data': {
//       'field1': 1,
//       'field2': 2.2,
//     },
//   };

//   // Create your MyClass instance
//   var myClass = BookReleaseChartData.fromJson(json);

//   // Get the values
//   var field1 = myClass.data['field1']; // prints 1
//   var field2 = myClass.data['field2']; // prints 2.2
// }
